﻿#ifndef CONFIG_H
#define CONFIG_H
#include <QFile>
#include <QJsonDocument>

class Config
{
private:
    explicit Config();

public:
    ~Config();
    Config(const Config&)=delete;
    Config& operator=(const Config&)=delete;
    static Config& get_instance()
    {
        static Config instance;
        return instance;
    }
    int getConfig(QString key);
    void setConfig(QString key,const QJsonValue& value);
private:
    QFile *file;
    QJsonDocument document;
    void printConfig();
};

#endif // CONFIG_H
